home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / procssng / ccs / ccs-11tl.lha / lbl / hips / sources / scale_geom / filt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-09-17  |  1.8 KB  |  55 lines

  1. /* filt.h: definitions for filter data types and routines */
  2.  
  3. #ifndef FILT_HDR
  4. #define FILT_HDR
  5.  
  6. /* $Header: filt.h,v 2.2 88/12/30 21:32:20 ph Locked $ */
  7.  
  8. typedef struct {        /* A 1-D FILTER */
  9.     char *name;            /* name of filter */
  10.     double (*func)();        /* filter function */
  11.     double supp;        /* radius of nonzero portion */
  12.     double blur;        /* blur factor (1=normal) */
  13.     char windowme;        /* should filter be windowed? */
  14.     char cardinal;        /* is this filter cardinal?
  15.                    ie, does func(x) = (x==0) for integer x? */
  16.     char unitrange;        /* does filter stay within the range [0..1] */
  17.     void (*initproc)();        /* initialize client data, if any */
  18.     void (*printproc)();    /* print client data, if any */
  19.     char *clientdata;        /* client info to be passed to func */
  20. } Filt;
  21.  
  22. #define filt_func(f, x) (*(f)->func)((x), (f)->clientdata)
  23. #define filt_print_client(f) (*(f)->printproc)((f)->clientdata)
  24.  
  25. Filt *filt_find();
  26. Filt *filt_window();
  27. void filt_print();
  28. void filt_catalog();
  29.  
  30.  
  31. /* the filter collection: */
  32.  
  33. double filt_box();        /* box, pulse, Fourier window, */
  34. double filt_triangle();        /* triangle, Bartlett window, */
  35. double filt_quadratic();    /* 3rd order (quadratic) b-spline */
  36. double filt_cubic();        /* 4th order (cubic) b-spline */
  37. double filt_catrom();        /* Catmull-Rom spline, Overhauser spline */
  38. double filt_mitchell();        /* Mitchell & Netravali's two-param cubic */
  39. double filt_gaussian();        /* Gaussian (infinite) */
  40. double filt_sinc();        /* Sinc, perfect lowpass filter (infinite) */
  41. double filt_bessel();        /* Bessel (for circularly symm. 2-d filt, inf)*/
  42.  
  43. double filt_hanning();        /* Hanning window */
  44. double filt_hamming();        /* Hamming window */
  45. double filt_blackman();        /* Blackman window */
  46. double filt_kaiser();        /* parameterized Kaiser window */
  47.  
  48. double filt_normal();        /* normal distribution (infinite) */
  49.  
  50.  
  51. /* support routines */
  52. double bessel_i0();
  53.  
  54. #endif
  55.